<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>模版数据管理 HDSysCms</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/style/admin.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui_ext/dtree/font/dtreefont.css">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/markdown/css/editormd.min.css" />
</head>
<body data="HDSYSCMS 2021本系统受国家版权局保护请勿破解或者二次开发传播">
<div class="layui-col-md12">
<div style="padding-left: 10px;line-height: 35px;" class="layui-card">
<span class="layui-breadcrumb">
<a href="">模版管理</a>
<a href=""><?php echo set_get('id') ?></a>
<a href="index.php?m=manage&c=Ad&a=table&id=<?php echo set_get('id') ?>">动态标签</a>
<a href="index.php?m=manage&c=Ad&a=edit&id=<?php echo set_get('id') ?>">编辑</a>
</span>
</div>
</div>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-header">编辑模版数据</div>
<div class="layui-card-body">
<form class="layui-form" action="#">
<input type="hidden" name="id" value="<?php echo set_get('id') ?>">
<div class="layui-form-item">
<label class="layui-form-label">名称</label>
<div class="layui-input-inline">
<input type="text" name="name" required="" readonly value="<?php echo $param_db_array_value['name'] ?>" lay-verify="required" placeholder="栏目名称" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label en">调用代码</label>
<div class="layui-input-inline">
<input type="text" name="code" required="" readonly="" value="<?php echo $param_db_array_value[call_my_str_code()] ?>" placeholder="栏目名称(英)" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">标题名称</label>
<div class="layui-input-inline" style="width: 300px;">
<input type="text" name="title" placeholder="如 首页轮播中文" value="<?php echo isset($param_db_array_value['title']) ? $param_db_array_value['title'] : '' ?>" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.title}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.title}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item en-hide">
<label class="layui-form-label en">标题名称(英)</label>
<div class="layui-input-inline" style="width: 300px;">
<input type="text" name="etitle" placeholder="如 首页轮播英文" value="<?php echo isset($param_db_array_value['etitle']) ? $param_db_array_value['etitle'] : '' ?>" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.etitle}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.etitle}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">跳转连接</label>
<div class="layui-input-inline" style="width: 300px;">
<input type="text" name="url" placeholder="https://www.baidu.com" value="<?php echo isset($param_db_array_value['url']) ? $param_db_array_value['url'] : '' ?>" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.url}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.url}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item en-hide">
<label class="layui-form-label en">跳转连接(英)</label>
<div class="layui-input-inline" style="width: 300px;">
<input type="text" name="eurl" placeholder="https://www.baidu.com" value="<?php echo isset($param_db_array_value['eurl']) ? $param_db_array_value['eurl'] : '' ?>" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.eurl}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.eurl}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">图片内容</label>
<div class="layui-input-inline" style="width: 300px;background-color: #1b84ed;background-image: linear-gradient(144deg, #0080ff, #FFF);">
<img id="imges-img" src="<?php $param_val=$param_db_array_value['imges']; $param_val=str_replace('{__URL__}', getsysurl(), $param_val); $param_val=str_replace('{__TEMPLATES__}', set_get('id'), $param_val); echo $param_val; ?>" class="logos" />
<input type="hidden" name="imges" id="imges" value="<?php echo isset($param_db_array_value['imges']) ? $param_db_array_value['imges'] : ''  ?>" placeholder="" class="layui-input">
</div>
<div style="line-height: 75px;margin-left: 20px;" class="layui-form-mid layui-word-aux">
<button type="button" class="layui-btn simges-uploadInst-img" id="simges-uploadInst-img">选择图片</button>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.imges}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.imges}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item en-hide">
<label class="layui-form-label en">图片内容(英)</label>
<div class="layui-input-inline" style="width: 300px;background-color: #1b84ed;background-image: linear-gradient(144deg, #0080ff, #FFF);">
<img id="eimges-img" src="<?php $param_val=$param_db_array_value['eimges']; $param_val=str_replace('{__URL__}', getsysurl(), $param_val); $param_val=str_replace('{__TEMPLATES__}', set_get('id'), $param_val); echo $param_val; ?>" class="logos" />
<input type="hidden" name="eimges" id="eimges" value="<?php echo isset($param_db_array_value['eimges']) ? $param_db_array_value['eimges'] : ''  ?>" placeholder="" class="layui-input">
</div>
<div style="line-height: 75px;margin-left: 20px;" class="layui-form-mid layui-word-aux">
<button type="button" class="layui-btn simges-uploadInst-eimg" id="simges-uploadInst-eimg">选择图片</button>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.eimges}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.eimges}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item page">
<label class="layui-form-label ">叙述长文</label>
<div class="layui-input-inline">
<textarea id="content" name="content" style="width:700px;;height: 250px;"><?php echo isset($param_db_array_value['content']) ? $param_db_array_value['content'] : ''  ?></textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item page">
<label class="layui-form-label "></label>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.content}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.content}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item page en-hide">
<label class="layui-form-label en">叙述长文(英)</label>
<div class="layui-input-inline">
<textarea id="econtent" name="econtent" style="width:700px;height: 250px;"><?php echo isset($param_db_array_value['econtent']) ? $param_db_array_value['econtent'] : ''  ?></textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item page en-hide">
<label class="layui-form-label "></label>
<div class="layui-form-mid layui-word-aux"><i onclick="show_adcode('{$advertisement.<?php echo $param_db_array_value[call_my_str_code()] ?>.econtent}','<br/><pre class=\'layui-code\'> {advertisement filename=\'<?php echo $param_db_array_value[call_my_str_code()] ?>\'  as=\'$vo\' } <br/> {$vo.econtent}  <br/> {/advertisement}</pre>')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="post">保存模块</button>
</div>
</div>
</form>
<style>.logos {width: 300px;height: 85px;border: #EEEEEE;border-style: solid;border-width: 1px;}</style>
</div>
</div>
</div>
</div>
</div>
<style>.dtree-zdy-item-this {background-color: #deeefd00 !important;}.dtree-zdy-item:hover {background-color: #deeefd !important;}.dtree-zdy-item cite {font-size: 16px !important;}.dtree-zdy-item:hover cite {color: #1b84ed !important;}.dtree-zdy-dtreefont {font-size: 18px !important;}.dtree-zdy-ficon {color: #2F4056 !important;}.dtree-zdy-icon {color: #2F4056 !important;}.dtree-zdy-checkbox:hover {color: #5FB878 !important;}.dtree-zdy-choose {color: #5FB878 !important;}.dtree-nav-first-line,.dtree-nav-line,.dtree-nav-last-line {line-height: 40px;}</style>
<?php adminechohtnl(); ?>
<div id="foot">Copyright © 2019-2023 <a href="https://www.HDSysCms.Com?pro" target="_blank">HDSysCms <?php echo HDSYS_VERSION; ?></a> <br>
All Rights Reserved </div>
<script src="<?php echo getcdnurlhost() ?>/admin/layui/layui.js"></script>
<script>var uploadInst_img;var uploadInst_eimg;layui.config({base: '<?php echo getcdnurlhost() ?>/admin/'}).use(['form', 'layer', 'dropdown', 'element', 'upload'], function() {var admin=layui.admin,$=layui.$,form=layui.form,upload=layui.upload,dropdown=layui.dropdown,element=layui.element;dropdown.render({elem: '.simges-uploadInst-img',trigger: 'contextmenu',data: [{title: '原图上传',id: 0}, {title: '720宽高自动 (默认)',id: 720}, {title: '960宽高自动 ',id: 960}, {title: '1200宽高自动',id: 1200}, {title: '1980宽高自动',id: 1980}],click: function(obj) {uploadInst_img.reload({url: 'index.php?m=manage&c=UpFile&a=UpTemplates&templates=<?php echo set_get('id') ?>&filename=<?php echo set_get('fileid') ?>&newwidth=' + obj.id});$('#simges-uploadInst-img').click();}});dropdown.render({elem: '.simges-uploadInst-eimg',trigger: 'contextmenu',data: [{title: '原图上传',id: 0}, {title: '720宽高自动 ',id: 720}, {title: '960宽高自动 ',id: 960}, {title: '1200宽高自动 (默认)',id: 1200}, {title: '1980宽高自动',id: 1980}],click: function(obj) {uploadInst_eimg.reload({url: 'index.php?m=manage&c=UpFile&a=UpTemplates&templates=<?php echo set_get('id') ?>&filename=e<?php echo set_get('fileid') ?>&newwidth=' + obj.id});$('#simges-album-bin-up').click();}});form.on('submit(post)', function(data) {data=data.field;data.content='';data.econtent='';data.content=editor_content.html();data.econtent=editor_econtent.html();layer.load(1);$.ajax({type: "post",url: 'index.php?m=manage&c=Ad&a=edit_ajax',data: {id: data.id,fileid: '<?php echo $param_fileid; ?>',name: data.name,ename: data.ename,code: data.code,code: data.code,url: data.url,eurl: data.eurl,title: data.title,etitle: data.etitle,content: data.content,econtent: data.econtent,imges: data.imges,eimges: data.eimges,},dataType: "json",success: function(ret) {layer.closeAll('loading');if (ret.code==1) {layer.confirm(ret.msg, {btn: ['确定完成', '停留继续操作']}, function() {location.href="index.php?m=manage&c=<?php echo set_get('c'); ?>&a=table&id=<?php echo set_get('id') ?>"});} else {layer.msg(ret.msg);}}});return false;});uploadInst_img=upload.render({elem: '.simges-uploadInst-img',url: 'index.php?m=manage&c=UpFile&a=UpTemplates&templates=<?php echo set_get('id') ?>&filename=<?php echo set_get('fileid') ?>&newwidth=0',before: function(obj) {layer.load(0);},done: function(res) {layer.closeAll();if (res.code==-1) {return layer.msg(res.msg);}console.log(res);$('#imges-img').attr('src',res.tmp_url);$('#imges').val(res.url);},error: function() {layer.closeAll();layer.alert('上传失败')}});uploadInst_eimg=upload.render({elem: '.simges-uploadInst-eimg',url: 'index.php?m=manage&c=UpFile&a=UpTemplates&templates=<?php echo set_get('id') ?>&filename=e<?php echo  set_get('fileid') ?>&newwidth=0',before: function(obj) {layer.load(0);},done: function(res) {layer.closeAll();if (res.code==-1) {return layer.msg(res.msg);}console.log(res);$('#eimges-img').attr('src', res.tmp_url);$('#eimges').val(res.url);},error: function() {layer.closeAll();layer.alert('上传失败')}});});</script>
<script charset="utf-8" src="<?php echo getcdnurlhost() ?>/kindeditor/kindeditor-all-min.js"></script>
<script charset='utf-8' src='<?php echo getcdnurlhost() ?>/kindeditor/app.js'></script>
</body>
</html>